package com.hk.math6;

import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class BaeCalendarMain {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		BaeCalendar cal=new BaeCalendar();
		//cal.calendar(2010);
		Date  d= new Date();
		System.out.println(d.toString());
		Calendar cald=Calendar.getInstance();
		cald.add(Calendar.DATE, -2);
		//System.out.println(cald);
		Date dd=cald.getTime();
		System.out.println(dd);
	
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		String s=sdf.format(dd);
		System.out.println(s);
		
		
		cald.setTimeInMillis(System.currentTimeMillis()+24*60*60*1000);
		
		dd=cald.getTime();
		System.out.println(dd);
		s=sdf.format(dd);
		System.out.println(s);
		
		System.out.println((4567+"").length());
		
		char ccc=(4567+"").charAt(0);
		System.out.println(ccc);
		
		int cd=(int)(100*Math.random());
		System.out.println(cd);
		
	}

}
